package org.colafries.common.metadata;

import cn.hutool.core.util.StrUtil;
import lombok.Data;

/**
 * @author colafries
 * @version v1.0
 * @ClassName Column
 * @Description
 * @date Created in 2024/3/19
 **/
@Data
public class Column {
    /**
     *
     */
    private String name;
    private String type;
    private String comment;
    private boolean keyFlag;
    private boolean autoIncrement;
    private String defaultValue;
    private boolean isNullable;
    private String javaType;
    private String columnFamily;
    private Integer position;
    private Integer length;
    private Integer precision;
    private Integer scale;
    private String characterSet;
    private String collation;

    public String getJavaTypeFormat() {
        return null == javaType ? StrUtil.EMPTY : javaType;
    }
}
